package com.example.demo.controller;


import com.example.demo.entity.InvokeResult;
import com.example.demo.service.BookQueryService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@RequestMapping("/book")
@RestController
public class DictController {

    @Autowired
    private BookQueryService bookQueryService;

    @RequestMapping("/dict")
    public InvokeResult queryDict(@RequestParam(value = "typeName")int  typeName){
        return new InvokeResult(bookQueryService.queryAll(typeName));
    }


}
